import Http from "../utils/Http";

export default class PageModel extends Http {

  // home
  getHome() {
    return this.request({
      url: '/h5/uni/home/index'
    })
  }

  // 首页抽奖数量
  getAwardCount() {
    return this.request({
      url: '/h5/uni/home/award-count'
    })
  }

  // 地区
  getAddress() {
    return this.request({
      url: '/h5/uni/home/address'
    })
  }

  // category
  getCategory() {
    return this.request({
      url: '/h5/uni/category/index'
    })
  }

  // cart
  getCart() {
    return this.request({
      url: '/h5/uni/cart/index'
    })
  }

  // center
  getCenter() {
    return this.request({
      url: '/h5/uni/center/index'
    })
  }

  // -------------------------------------

  joinTitle() {
    return this.request({
      url: '/h5/uni/join/title'
    })
  }

  joinProduct() {
    return this.request({
      url: '/h5/uni/join/product'
    })
  }

  materialList(data) {
    return this.request({
      url: '/h5/uni/material/list',
      data
    })
  }

  // -------------------------------------

  cityMerchant(data) {
    return this.request({
      url: '/h5/uni/offline/city-merchant',
      data
    })
  }

  // 商家页面
  offlineUni(data) {
    return this.request({
      url: '/h5/uni/offline/index',
      data
    })
  }

  offlineProduct(data) {
    return this.request({
      url: '/h5/uni/offline/product',
      data
    })
  }

  // 核销订单
  merchantOrder(data) {
    return this.request({
      url: '/h5/uni/offline/merchant-order',
      data
    })
  }

  // 扫码核销
  scanMerchant(data) {
    return this.request({
      url: '/h5/uni/offline/merchant-scan',
      data
    })
  }

  // 收款码
  merchantPay(data) {
    return this.request({
      url: '/h5/uni/offline/merchant-pay',
      data
    })
  }

  // 创建支付订单
  merchantPayRun(data) {
    return this.request({
      url: '/h5/uni/offline/merchant-pay-run',
      data
    })
  }


}
